home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
003
/
dbsteel1.arc
/
CSCREEN.BAS
< prev
next >
Wrap
BASIC Source File
|
1979-12-31
|
19KB
|
662 lines
4 DEFINT A-W,Y-Z
5 DIM F$(15),FLDN$(17,40),FTY(17,40),FL(17,40)
13 DIM L(17),NREC(17)
16 DIM KY(17,40),KEYLIST(17,40)
35 DIM K$(80)
40 DIM SCRN(40),LE(40),CE(40),LEK(40),CEK(40),SW$(19)
50 DIM SUMF(40)
70 CH = 29
75 PRINT FRE(0)
77 GOSUB 52000
80 GOSUB 50000
100 GOTO 1000
200 GOTO 40000
500 REM ******* CLS
510 CLS
520 RETURN
600 REM ******* LOCATE 20,1
610 LOCATE 20,1
620 FOR T3= 1 TO 5
630 PRINT " ";
640 NEXT T3
650 LOCATE 20,1
660 RETURN
1000 REM ****** INITIAL MENU
1100 GOSUB 500
1110 PRINT "************** WHICH OPTION DO YOU WANT ****************"
1130 PRINT " 0 - EXIT PROGRAM"
1140 PRINT " 1 - ENTER A NEW SCREEN DESCRIPTION"
1150 PRINT " 2 - READ A SCREEN DESCRIPTION"
1160 PRINT " 3 - PRINT A SCREEN DESCRIPTION ON PAPER"
1170 PRINT " 4 - CHANGE A SCREEN DESCRIPTION "
1200 PRINT "******** ENTER THE NUMBER THEN PRESS RETURN ************"
1210 GOSUB 60000
1215 IF DT# < 0 OR DT# > 4 THEN 1210
1220 T = DT#
1230 IF T = 0 THEN GOTO 51000
1240 ON T GOTO 10000,20000,30000,40000
8000 REM ***** FILE NAME ACCEPLABLE TEST ************
8010 TEST = 1
8100 FOR Q = 1 TO LEN(A$)
8110 K$(Q) = MID$(A$,Q,1)
8120 C = ASC(K$(Q))
8130 IF C < 48 OR C > 122 THEN TEST = 4
8140 IF Q = 1 AND ( C < 65 OR C > 122 ) THEN TEST = 4
8150 NEXT Q
8190 RETURN
10000 REM ****** ENTER A SCREEN DESCRIPTION
10100 GOSUB 500
10200 PRINT "***** WHICH FILE DO YOU WANT TO ENTER A SCREEN DESCRIPTIN FOR *****"
10210 FOR T = 1 TO MAXF
10220 PRINT T;" - ";F$(T)
10230 NEXT T
10300 PRINT "***** ENTER THE FILE NUMBER THEN PRESS RETURN *****"
10310 GOSUB 60000
10320 IF DT# < 1 OR DT# > MAXF GOTO 10310
10330 A = DT#
10500 GOSUB 26000
10600 SCRN(A) = 5
10610 GOSUB 25000
11000 REM ***** INPUT INTRO
11100 GOSUB 500
12000 REM ***** INPUT OVERLAYS
12100 GOSUB 500
12110 PRINT " ----5----10---15---20---25---30---35---40---45---50---55---60---65---70---- "
12120 MAX = 78
12130 FOR TF= 1 TO 18
12132 GOSUB 12140
12134 NEXT TF
12136 GOTO 13000
12140 GOSUB 62030
12150 SW$(TF) = A$
12160 RETURN
13000 REM ******** INPUT LOCATIONS OF FIELDS *********
13100 FOR T = 1 TO NREC(A)
13110 GOSUB 600
13112 GOSUB 13120
13115 NEXT T
13117 GOTO 14000
13120 PRINT "FIELD NUMBER :";T;" FIELD NAME :";FLDN$(A,T)
13130 PRINT "WHICH LINE DO YOU WANT ENTRY ON "
13400 GOSUB 60000
13410 IF DT# < 0 OR DT# > 18 THEN 13400
13420 LE(T) = DT#
13500 PRINT "WHICH COLUMN DO YOU WANT THE ENTRY TO START AT"
13510 SPRT = 5
13600 GOSUB 60000
13610 IF DT# < 1 OR DT# > 78 THEN 13600
13620 CE(T) = DT#
13700 IF FTY(A,T) = 2 AND KY(A,T) = 2 THEN GOSUB 13800
13710 RETURN
13800 REM *******
13820 GOSUB 600
13830 PRINT "WHICH LINE DO YOU WANT THE KEY PRINTED ON "
13840 GOSUB 60000
13850 IF DT# < 0 OR DT# > 18 THEN 13840
13860 LEK(T) = DT#
13870 PRINT "WHICH COLUMN DO YOU WANT THE KEY PRINTED ON "
13875 SPRT = 5
13880 GOSUB 60000
13900 IF DT# < 0 OR DT# > 78 THEN 13880
13910 CEK(T) = DT#
13920 RETURN
14000 REM ******* PUT DATA ON FILES
14010 GOSUB 15000
14100 A$ = STR$(A)
14110 A$ = MID$(A$,2)
14120 A$ = "SCREEN" + A$
14200 GOSUB 27000
14300 GOTO 1000
15000 REM ******** REPEATING FIELDS
15100 GOSUB 500
15200 PRINT " DO YOU WANT TO USE THE REPEATING FIELDS OPTION "
15210 PRINT ""
15220 PRINT " 1 - NO "
15230 PRINT " 2 - YES"
15300 PRINT ""
15310 PRINT "***** ENTER THE NUMBER THEN PRESS RETURN *****"
15320 GOSUB 60000
15330 IF DT# < 1 OR DT# > 2 THEN 15320
15340 RPT = DT#
15350 IF RPT = 1 THEN RETURN
15400 REM ****** INPUTING DATA
15410 GOSUB 500
15415 PRINT "******** WHICH FIELD IS THE LAST EQUAL FIELD ********"
15420 FOR T = 1 TO NREC(A)
15430 PRINT T;" - ";FLDN$(A,T)
15440 NEXT T
15450 PRINT "****** ENTER THE NUMBER THEN PRESS RETURN ******"
15460 GOSUB 60000
15470 IF DT# < 1 OR DT# > NREC(A) THEN 15460
15480 LSTE = DT#
15500 REM ****** INPUTING FIELDS TO SUM
15510 GOSUB 500
15520 T2 = LSTE + 1
15530 FOR T = T2 TO NREC(A)
15540 GOSUB 500
15550 PRINT T;" - ";FLDN$(A,T)
15560 PRINT "***** DO YOU WANT THIS FIELD SUMMED *****"
15570 PRINT " 1 - NO "
15580 PRINT " 2 - YES , SUM THIS FIELD "
15590 PRINT "***** ENTER THE NUMBER THEN PRESS RETURN *****"
15600 GOSUB 60000
15610 IF DT# < 1 OR DT# > 2 THEN 15600
15615 IF FTY(A,T) = 1 AND DT# = 2 THEN 15600
15620 SUMF(T) = DT#
15630 NEXT T
15640 RETURN
20000 REM ******* READ A SCREEN DESCRIPTION
20100 GOSUB 500
20110 GOSUB 26000
20120 PRINT "******* WHICH SCREEN DO YOU WANT TO SEE *******"
20130 FOR T = 1 TO MAXF
20140 IF SCRN(T) <> 0 THEN PRINT T;" - ";F$(T)
20150 NEXT T
20160 PRINT "***** ENTER THE NUMBER THEN PRESS RETURN *****"
20170 GOSUB 60000
20180 IF DT# < 1 OR DT# > MAXF THEN 20170
20190 IF SCRN(DT#) = 0 THEN 20170
20200 A = DT#
20300 REM ******* GET FILE
20310 A$ = STR$(A)
20320 A$ = MID$(A$,2)
20330 A$ = "SCREEN"+A$
20340 GOSUB 28000
20400 REM ******* PRINT OVERLAYS
20410 GOSUB 500
20420 PRINT "******** TOP LINE RESERVED FOR FILE NAME AND RECORD NUMBER *********"
20430 FOR T = 1 TO 18
20440 PRINT SW$(T)
20450 NEXT T
20460 PRINT "******** PRESS ANY KEY TO CONTINUE ********"
20470 IF INKEY$ = "" THEN 20470
20500 REM ******* PRINT FIELD LOCATIONS
20510 GOSUB 500
20515 PRINT " FIELD LINE COLUMN KEY LINE KEY COLUMN"
20520 FOR T = 1 TO NREC(A)
20530 PRINT T;FLDN$(A,T) TAB(30) LE(T); TAB(40) CE(T);
20540 IF FTY(A,T) = 2 THEN PRINT TAB(50) LEK(T);TAB(60) CEK(T);
20550 PRINT ""
20560 NEXT T
20600 PRINT "********* PRESS ANY KEY TO CONTINUE ************"
20610 IF INKEY$ = "" THEN 20610
20800 GOSUB 21000
20900 GOTO 1000
21000 REM ****** PRINT REPEATING FIELDS
21100 GOSUB 500
21110 IF RPT = 2 THEN GOTO 21200
21120 PRINT " NO REPEATING FIELDS SPECIFIED "
21130 PRINT ""
21140 PRINT "***** PRESS ANY KET TO CONTINUE ******"
21150 IF INKEY$ = "" THEN 21150
21160 RETURN
21200 REM ******** PRINT REPEATING FIELDS
21210 PRINT "REPEATING FIELDS SPECIFIED "
21220 PRINT "LAST EQUAL FIELD IS FIELD NUMBER ";LSTE;" - ";FLDN$(A,LSTE)
21230 PRINT ""
21240 PRINT "THE REPEATING FIELDS ARE : "
21250 T2 = LSTE + 1
21260 FOR T = T2 TO NREC(A)
21270 PRINT T;" - ";FLDN$(A,T);
21280 IF SUMF(T) = 2 THEN PRINT " -THIS FIELD IS SUMMED ";
21285 PRINT ""
21290 NEXT T
21300 PRINT ""
21310 PRINT " PRESS ANY KEY TO CONTINUE "
21320 IF INKEY$ = "" THEN 21320
21330 RETURN
23780 REM ************* READ SUBROUTINE *************
23800 OPEN "I",#1,"FFILE"
23820 INPUT #1,MAXF
23840 FOR A = 1 TO MAXF
23860 INPUT #1,A,F$(A),NREC(A),L(A)
23880 FOR N = 1 TO NREC(A)
23900 INPUT #1,FLDN$(A,N),FTY(A,N),FL(A,N)
23920 IF FTY(A,N) = 2 THEN INPUT #1,KY(A,N),KEYLIST(A,N)
23940 NEXT N
23960 NEXT A
23980 CLOSE #1
24000 RETURN
25000 REM ************ WRITE SCREEN TEST *********
25100 OPEN "O",#1,"SCTEST"
25200 FOR T = 1 TO 40
25300 WRITE #1,SCRN(T)
25400 NEXT T
25500 CLOSE #1
25600 RETURN
26000 REM ************ READ SCREEN TEST *********
26100 OPEN "I",#1,"SCTEST"
26200 FOR T = 1 TO 40
26300 INPUT #1,SCRN(T)
26400 NEXT T
26500 CLOSE #1
26600 RETURN
27000 REM ************ WRITE SCREEN DESCRIPTION *********
27100 OPEN "O",#1,A$
27110 FOR T = 1 TO 18
27120 WRITE #1,SW$(T)
27130 NEXT T
27210 FOR T = 1 TO NREC(A)
27220 WRITE #1,LE(T),CE(T)
27230 IF FTY(A,T) = 2 THEN WRITE #1,LEK(T),CEK(T)
27240 NEXT T
27242 WRITE #1,RPT
27244 IF RPT = 2 THEN GOSUB 27400
27250 CLOSE #1
27300 RETURN
27400 WRITE #1,LSTE
27410 T2 = LSTE + 1
27420 FOR T = T2 TO NREC(A)
27430 WRITE #1,SUMF(T)
27440 NEXT T
27450 RETURN
28000 REM ************ READ SCREEN DESCRIPTION *********
28100 OPEN "I",#1,A$
28110 FOR T = 1 TO 18
28120 INPUT #1,SW$(T)
28130 NEXT T
28210 FOR T = 1 TO NREC(A)
28220 INPUT #1,LE(T),CE(T)
28230 IF FTY(A,T) = 2 THEN INPUT #1,LEK(T),CEK(T)
28240 NEXT T
28242 INPUT #1,RPT
28244 IF RPT = 2 THEN GOSUB 28400
28250 CLOSE #1
28300 RETURN
28400 INPUT #1,LSTE
28410 T2 = LSTE + 1
28420 FOR T = T2 TO NREC(A)
28430 INPUT #1,SUMF(T)
28440 NEXT T
28450 RETURN
30000 REM ******* PRINT A SCREEN DESCRIPTION ON PAPER
30100 GOSUB 500
30110 GOSUB 26000
30115 PRINT "************** MAKE SURE YOUR PRINTER IS ON **************"
30120 PRINT "******* WHICH SCREEN DO YOU WANT TO PRINT ON PAPER *******"
30130 FOR T = 1 TO MAXF
30140 IF SCRN(T) <> 0 THEN PRINT T;" - ";F$(T)
30150 NEXT T
30160 PRINT "*********** ENTER THE NUMBER THEN PRESS RETURN *********"
30170 GOSUB 60000
30180 IF DT# < 1 OR DT# > MAXF THEN 30170
30190 IF SCRN(DT#) = 0 THEN 30170
30200 A = DT#
30300 REM ******* GET FILE
30310 A$ = STR$(A)
30320 A$ = MID$(A$,2)
30330 A$ = "SCREEN"+A$
30340 GOSUB 28000
30400 REM ******* PRINT OVERLAYS
30410 GOSUB 500
30420 LPRINT "******** TOP LINE RESERVED FOR FILE NAME AND RECORD NUMBER *********"
30430 FOR T = 1 TO 18
30440 LPRINT SW$(T)
30450 NEXT T
30500 REM ******* PRINT FIELD LOCATIONS
30510 GOSUB 500
30515 LPRINT " FIELD LINE COLUMN KEY LINE KEY COLUMN"
30520 FOR T = 1 TO NREC(A)
30530 LPRINT T;FLDN$(A,T) TAB(30) LE(T); TAB(40) CE(T);
30540 IF FTY(A,T) = 2 THEN LPRINT TAB(50) LEK(T);TAB(60) CEK(T);
30550 LPRINT ""
30560 NEXT T
30800 GOSUB 31000
30900 GOTO 1000
31000 REM ****** PRINT REPEATING FIELDS
31110 IF RPT = 2 THEN GOTO 31200
31120 LPRINT " NO REPEATING FIELDS SPECIFIED "
31160 RETURN
31200 REM ******** PRINT REPEATING FIELDS
31210 LPRINT "REPEATING FIELDS SPECIFIED "
31220 LPRINT "LAST EQUAL FIELD IS FIELD NUMBER ";LSTE;" - ";FLDN$(A,LSTE)
31230 LPRINT ""
31240 LPRINT "THE REPEATING FIELDS ARE : "
31250 T2 = LSTE + 1
31260 FOR T = T2 TO NREC(A)
31270 LPRINT T;" - ";FLDN$(A,T);
31280 IF SUMF(T) = 2 THEN LPRINT " -THIS FIELD IS SUMMED ";
31285 LPRINT ""
31290 NEXT T
31300 RETURN
40000 REM ******* CHANGE A SCREEN DESCRIPTION
40100 GOSUB 500
40110 GOSUB 26000
40120 PRINT "******* WHICH SCREEN DO YOU WANT TO CHANGE ******"
40130 FOR T = 1 TO MAXF
40140 IF SCRN(T) <> 0 THEN PRINT T;" - ";F$(T)
40150 NEXT T
40160 PRINT "***** ENTER THE NUMBER THEN PRESS RETURN *****"
40170 GOSUB 60000
40180 IF DT# < 1 OR DT# > MAXF THEN 20170
40190 IF SCRN(DT#) = 0 THEN 20170
40200 A = DT#
40300 REM ******* GET FILE
40310 A$ = STR$(A)
40320 A$ = MID$(A$,2)
40330 A$ = "SCREEN"+A$
40335 AH$ = A$
40340 GOSUB 28000
41000 REM ******* CHANGE MENU
41100 GOSUB 500
41110 PRINT "********** WHAT TYPE OF CHANGE ***********"
41120 PRINT " 0 - NO CHANGE / DONE WITH CHANGE
41130 PRINT " 1 - CHANGE THE LOCATION OF A FIELD "
41140 PRINT " 2 - CHANGE AN OVERLAY LINE "
41145 PRINT " 3 - CHANGE THE REPEATING FIELDS"
41150 PRINT "**** ENTER THE NUMBER THEN PRESS RETURN ****"
41200 GOSUB 60000
41210 IF DT# < 0 OR DT# > 3 THEN 41200
41220 T = DT#
41225 T = T + 1
41230 ON T GOTO 41300,42000,43000,44000
41300 REM ****** DONE WRITE TO FILE
41305 A$ = AH$
41310 GOSUB 27000
41320 GOTO 1000
42000 REM ******** CHANGE THE LOCATION OF A FIELD
42100 GOSUB 500
42110 PRINT "***** WHICH FIELD LOCATION DO YOU WANT TO CHANGE *****"
42120 FOR T = 1 TO NREC(A)
42130 PRINT T;" - ";FLDN$(A,T)
42140 NEXT T
42150 PRINT "***** ENTER THE NUMBER THE PRESS RETURN ******"
42160 GOSUB 60000
42170 IF DT# < 1 OR DT# > NREC(A) THEN 42160
42180 T = DT#
42190 GOSUB 13120
42200 GOTO 41000
43000 REM ******** CHANGE OVERLAY LINE
43100 PRINT "WHICH LINE DO YOU WANT TO CHANGE "
43200 GOSUB 60000
43210 IF DT# < 1 OR DT# > 18 THEN 43200
43220 TF = DT#
43230 PRINT "ENTER THE NEW OVERLAY LINE "
43240 MAX = 78
43250 GOSUB 12140
43300 GOTO 41000
44000 REM ****** CHANGE THE REPEATING FIELDS
44100 GOSUB 15000
44200 GOTO 41000
50000 REM ********** INTRO
50010 GOSUB 500
50100 PRINT " S C R E E N D E S C R I P T I O N P R O G R A M 3.0 "
50105 PRINT ""
50110 PRINT " Copyright 1984 by Potomac Pacific Engineering Inc."
50120 PRINT ""
50130 PRINT "This program is licensed FREE to all users with some restrictions"
50165 PRINT " See the manual for more information on the license."
50167 PRINT ""
50920 GOSUB 23780
50950 PRINT "****************** PRESS ANY KEY TO CONTINUE *****************";
50960 IF INKEY$ = "" GOTO 50960
50970 RETURN
51000 REM ***** EXIT TO SYSTEM
51100 GOSUB 500
51110 CLOSE
51120 PRINT " -BYE, Have a nice day"
51130 END
52000 REM ***** INTRO 1
52010 GOSUB 500
52100 PRINT " Put the DATA DISK in the default disk drive "
52110 PRINT ""
52120 PRINT " ***** THEN PRESS ANY KEY TO CONTINUE *****"
52130 PRINT ""
52140 PRINT " The CUSTOM programs only use the PROGRAM DATA DISK"
52150 PRINT "Keep it in the default disk drive at all times during this program."
52200 IF INKEY$ = "" GOTO 52200
52210 RETURN
60000 REM ******* INTEGER LESS THEN 100 CHECK ********
60010 MAX = 2
60020 ACT$ = "1234567890=<>^"
60030 IF NE = 0 THEN ACT$ = "1234567890"
60040 PRINT ">__<";
60050 GOTO 60240
60060 REM ******* INTEGER *******
60070 MAX = 8
60080 ACT$ = "1234567890-+,=<>^"
60090 IF NE = 0 THEN ACT$ = "1234567890-+,"
60100 PRINT ">________<";
60110 GOTO 60240
60120 REM ******* SINGLE PRECISION *******
60130 MAX = 10
60140 ACT$ = "1234567890-+,.%$=<>^"
60150 IF NE = 0 THEN ACT$ = "1234567890+-,.%$"
60160 PRINT ">__________<";
60170 GOTO 60240
60180 REM ******* DOUBLE PRECISION *******
60190 MAX = 20
60200 ACT$ = "1234567890-+,.%$=<>^"
60210 IF NE = 0 THEN ACT$ = "1234567890+-,.%$"
60220 PRINT ">____________________<";
60230 GOTO 60240
60240 REM ********** NUMBER CHECK **********
60250 A$ = ""
60260 K$(20) = " "
60270 KTMAX = 0
60280 FOR T9 = 1 TO MAX
60290 K$(T9) = " "
60300 NEXT T9
60310 DIG$ = "1234567890."
60320 DOTFLG = 0
60330 T2 = MAX + 1
60340 FOR T6 = 1 TO T2
60350 PRINT CHR$(CH);
60360 NEXT T6
60370 IF INKEY$ = "" GOTO 60380 ELSE GOTO 60370
60380 KT = 0
60390 REM *********** CHECK ALFANUMERIC INPUT FOR LENGTH ***********
60400 KT = KT + 1
60410 REM
60420 W$ = INKEY$
60430 IF W$ = "" GOTO 60420
60440 C = ASC(W$)
60450 IF C = 0 THEN GOSUB 61900
60460 IF C = 13 GOTO 60580
60470 IF C = 17 OR C = 8 GOTO 61150
60480 IF C = 19 GOTO 60670
60490 IF C = 4 GOTO 60720
60500 IF C = 6 GOTO 60780
60510 IF C = 1 GOTO 60960
60520 IF KT > MAX GOTO 60410
60530 IF INSTR(ACT$,W$) = 0 GOTO 61230
60540 K$(KT) = W$
60550 PRINT K$(KT);
60560 IF KT > KTMAX THEN KTMAX = KT
60570 GOTO 60400
60580 REM ********** RETURN **********
60590 FOR T9 = 1 TO KTMAX
60600 A$ = A$ + K$(T9)
60610 NEXT T9
60620 IF KTMAX = 0 THEN PRINT "1";
60630 IF KTMAX = 0 THEN DT# = 1
60650 IF SPRT < 5 THEN PRINT ""
60652 SPRT = 0
60655 IF KTMAX = 0 THEN RETURN
60660 GOTO 61260
60670 REM ********* MOVE CURSE BACK ********
60680 IF KT = 1 GOTO 60410
60690 KT = KT - 1
60700 PRINT CHR$(CH);
60710 GOTO 60410
60720 REM ********* MOVE CURSER FORWARD *********
60730 IF KT >= MAX GOTO 60410
60740 IF KT > (KTMAX + 1) GOTO 60410
60750 PRINT K$(KT);
60760 KT = KT + 1
60770 GOTO 60410
60780 REM ********** INSERT ***********
60790 IF KT > KTMAX GOTO 60410
60800 X9 = MAX
60810 WHILE X9 > KT
60820 X9 = X9 - 1
60830 K$(X9 + 1) = K$(X9)
60840 WEND
60850 K$(KT) = " "
60860 KTMAX = KTMAX + 1
60870 IF KTMAX > MAX THEN KTMAX = MAX
60880 FOR T9 = KT TO KTMAX
60890 PRINT K$(T9);
60900 NEXT T9
60910 T6 = (KTMAX - KT) + 1
60920 FOR T7 = 1 TO T6
60930 PRINT CHR$(CH);
60940 NEXT T7
60950 GOTO 60410
60960 REM ********** DELETE ***********
60970 IF KT > KTMAX GOTO 60410
60980 IF KTMAX = 1 GOTO 60410
60990 K$(MAX + 1) = ""
61000 X9 = KT
61010 WHILE X9 <= MAX
61020 K$(X9) = K$(X9 + 1)
61030 X9 = X9 + 1
61040 WEND
61050 KTMAX = KTMAX - 1
61060 FOR T9 = KT TO KTMAX
61070 PRINT K$(T9);
61080 NEXT T9
61090 PRINT "_";
61100 T7 = (KTMAX - KT) + 2
61110 FOR T8 = 1 TO T7
61120 PRINT CHR$(CH);
61130 NEXT T8
61140 GOTO 60410
61150 REM ********* BACKSPACE ********
61160 IF KT = 1 GOTO 60410
61170 KT = KT - 1
61180 PRINT CHR$(CH);
61190 K$(KT) = " "
61200 PRINT "_";
61210 PRINT CHR$(CH);
61220 GOTO 60410
61230 REM ******* INPUT NOT ACCEPTABLE ********
61240 PRINT CHR$(7);
61250 GOTO 60420
61260 REM ********* CLEAR STRINGS ********
61270 MAX = LEN(A$)
61280 D2$ = ""
61290 D1$ = ""
61300 DFLG = 0
61310 FOR Q93 = 1 TO MAX
61320 R$ = MID$(A$,Q93,1)
61330 IF INSTR(DIG$,R$) = 0 GOTO 61400
61340 IF R$ = "." OR DFLG = 1 GOTO 61380
61350 IF DFLG = 1 GOTO 61380
61360 D2$ = D2$ + R$
61370 GOTO 61400
61380 D1$ = D1$ + R$
61390 DFLG = 1
61400 NEXT Q93
61410 DA# = VAL(D2$)
61420 D1# = VAL(D1$)
61430 DT# = DA# + D1#
61440 IF K$(1) = "-" THEN DT# = -DT#
61450 RETURN
61900 REM ****** CHECK FOR ASC0
61910 S4$ = INKEY$
61920 C2 = ASC(S4$)
61930 IF C2 = 83 THEN C = 1
61940 IF C2 = 82 THEN C = 6
61950 IF C2 = 75 THEN C = 19
61960 IF C2 = 77 THEN C = 4
61970 RETURN
62000 REM ********** ALPHANUMERIC CHECK **************
62010 MAX = FL(A,Q)
62020 GOTO 62040
62030 REM ******** MAX SET IN PROGRAM ********
62040 A$ = ""
62050 PRINT ">";
62060 FOR N9 = 1 TO MAX
62070 K$(N9) = ""
62080 PRINT "_";
62090 NEXT N9
62100 PRINT "<";
62110 T2 = MAX + 1
62120 FOR T4 = 1 TO T2
62130 PRINT CHR$(CH);
62140 NEXT T4
62150 KT = 0
62160 KTMAX = 1
62170 REM *********** CHECK ALFANUMERIC INPUT FOR LENGTH ***********
62180 KT = KT + 1
62190 PRINT TAB(KT+1)"";
62200 K$ = INKEY$
62210 IF K$ = "" GOTO 62200
62220 C = ASC(K$)
62230 IF C = 0 THEN GOSUB 61900
62240 IF C = 13 GOTO 62350
62250 IF C = 17 OR C = 8 GOTO 62920
62260 IF C = 19 GOTO 62450
62270 IF C = 4 GOTO 62500
62280 IF C = 6 GOTO 62560
62290 IF C = 1 GOTO 62730
62300 IF KT > MAX GOTO 62190
62310 K$(KT) = K$
62320 PRINT K$(KT);
62330 IF KT > KTMAX THEN KTMAX = KT
62340 GOTO 62180
62350 REM ********** RETURN **********
62360 FOR T9 = 1 TO MAX
62370 A$ = A$ + K$(T9)
62420 NEXT T9
62430 PRINT ""
62440 RETURN
62450 REM ********* MOVE CURSE BACK ********
62460 IF KT = 1 GOTO 62190
62470 KT = KT - 1
62480 PRINT CHR$(CH);
62490 GOTO 62190
62500 REM ********* MOVE CURSER FORWARD *********
62510 IF KT >= MAX GOTO 62190
62520 IF KT > KTMAX GOTO 62190
62530 PRINT K$(KT);
62540 KT = KT + 1
62550 GOTO 62190
62560 REM ********** INSERT ***********
62570 X9 = MAX
62580 WHILE X9 > KT
62590 X9 = X9 - 1
62600 K$(X9 + 1) = K$(X9)
62610 WEND
62620 K$(KT) = " "
62630 KTMAX = KTMAX + 1
62640 IF KTMAX > MAX THEN KTMAX = MAX
62650 FOR T9 = KT TO KTMAX
62660 PRINT K$(T9);
62670 NEXT T9
62680 T6 = (KTMAX - KT) +1
62690 FOR T7 = 1 TO T6
62700 PRINT CHR$(CH);
62710 NEXT T7
62720 GOTO 62190
62730 REM ********** DELETE ***********
62740 IF KT > KTMAX GOTO 62200
62750 IF KTMAX = 1 GOTO 62190
62760 K$(MAX + 1) = ""
62770 X9 = KT
62780 WHILE X9 <= KTMAX
62790 K$(X9) = K$(X9 + 1)
62800 X9 = X9 + 1
62810 WEND
62820 KTMAX = KTMAX - 1
62830 FOR T9 = KT TO KTMAX
62840 PRINT K$(T9);
62850 NEXT T9
62860 PRINT "_";
62870 T7 = (KTMAX - KT) + 2
62880 FOR T6 = 1 TO T7
62890 PRINT CHR$(CH);
62900 NEXT T6
62910 GOTO 62190
62920 REM ********* BACKSPACE ********
62930 IF KT = 1 GOTO 62190
62940 K$(KT) = " "
62950 KT = KT - 1
62960 K$(KT) = " "
62970 PRINT CHR$(CH);
62980 PRINT "_";
62990 PRINT CHR$(CH);
63000 GOTO 62190
" "
6